package com.softeem.xyblogmaster.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.softeem.xyblogmaster.domain.Articles;
import com.softeem.xyblogmaster.domain.Users;
import com.softeem.xyblogmaster.service.UsersService;
import com.softeem.xyblogmaster.mapper.UsersMapper;
import com.softeem.xyblogmaster.util.PageInfo;
import org.springframework.stereotype.Service;

/**
* @author 段伟韬的笔记本
* @description 针对表【blog_users】的数据库操作Service实现
* @createDate 2025-04-15 16:31:04
*/
@Service
public class UsersServiceImpl extends ServiceImpl<UsersMapper, Users>
    implements UsersService{

    @Override
    public PageInfo page(int current, int size, String keyword)
    {
        LambdaQueryWrapper<Users> lambdaQueryWrapper=new LambdaQueryWrapper();
        lambdaQueryWrapper.like(Users::getUname,"%"+keyword+"%");
        Page pages = this.page(new Page<Users>(current,size), lambdaQueryWrapper);
        System.out.println(pages.getRecords());
        PageInfo pageInfo = new PageInfo(pages,7);
        return pageInfo;
    }
}




